@bg-color: #b7d4a8;

* {
  margin: 0;
  padding: 0;
  // 改变盒模型
  box-sizing: border-box;
}

body {
  font: 20px "Courier";
}

// 主窗口样式
#main {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  width: 360px;
  height: 420px;
  margin: 100px auto 10px;
  padding: 10px;
  background-color: @bg-color;
  border: 1px solid black;
  border-radius: 10px;

  // 身体
  #stage {
    position: relative;
    width: 304px;
    height: 304px;
    border: 2px solid black;

    // 设置蛇的样式
    #snake {
      .snake-body {
        position: absolute;
        width: 10px;
        height: 10px;
        background-color: #000;
        border: 1px solid @bg-color;
      }

      // 蛇头样式需改
      .snake-body:first-child {
        background-color: rgb(246, 68, 8);
        border-radius: 50%;
      }
    }

    // 食物
    #food {
      position: absolute;
      top: 30px;
      left: 10px;
      width: 10px;
      height: 10px;
      background-color: black;
      border: 1px solid #b7d4a8;
      // transform: rotate(45deg);
    }
  }

  #score-panel {
    display: flex;
    justify-content: space-between;
    width: 304px;
    margin-top: 20px;
  }
}

#desc {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  margin: 20px auto;

  .mt10 {
    margin-top: 10px;
  }
}